<!DOCTYPE html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<body>
    <c:if test="${user ne null and count ne null}">
        <p>
            Hi ${user}, you have visited this page ${count} times.
        </p>
    </c:if>
    <c:if test="${userMap ne null}">
    <table border="1">
        <thead>
            <tr><th>User</th><th>count</th></tr>
        </thead>
        <tbody>
        <c:forEach var="user" items="${userMap}">
            <tr>
                <td><a href="user/${user.key}">${user.key}</a></td>
                <td><a href="user/${user.key};remove=true">${user.value}</a></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <input id="user" type="text" />
    <button onclick="window.location = 'user/' + document.getElementById('user').value">Add</button>
    </c:if>
    <c:if test="${headers ne null}">
    <table border="1">
        <thead>
            <tr><th>Header</th><th>Value</th></tr>
        </thead>
        <tbody>
            <c:forEach var="entry" items="${headers}">
            <tr><td>${entry.key}</td><td>${entry.value}</td></tr>
            </c:forEach>
        </tbody>
    </table>
    </c:if>
    <c:if test="${locale ne null}">
        <p>The request locale is: ${locale}.</p>
        <p>The JSESSIONID is: ${JSESSIONID}.</p>
    </c:if>
    <c:if test="${request ne null}">
        <form method="post" action="response" target="responseFrame">
            <textarea rows="5" cols="80" name="data">Enter some data</textarea>
            <br/><input type="submit" /><br/>
        </form>
        <iframe src="" name="responseFrame"></iframe>
    </c:if>
    <p><a href="javascript:history.go(-1)">Go Back</a></p>
</body>
</html>
